---
id: android
title: Building the Android App
sidebar_label: Android
sidebar_position: 1
---

## Build instructions

If you would like to develop this application we'd love your help! These build instructions are brief and should be improved, please send a PR if you can.

1. Use Android Studio to build/debug
2. Clone the repository and after successful cloning, change the working directory to Meshtastic-Android/
   ```shell
   git clone https://github.com/meshtastic/Meshtastic-Android.git --recursive && cd Meshtastic-Android/
   ```
3. Now you should be able to select "Run / Run" in the IDE and it will happily start running on your phone or the emulator.

:::note
The emulators don't support Bluetooth, so some features can not be used in that environment.
:::

## Setup Analytics

Analytics are included but can be disabled by the user on the settings screen.

1. Configure analytics for development device

   ```shell
   adb shell setprop debug.firebase.analytics.app com.geeksville.mesh
   adb shell setprop log.tag.FirebaseCrashlytics DEBUG
   ```

2. Set verbose logging

   ```shell
   adb shell setprop log.tag.FA VERBOSE
   ```

## Publish to Google Play

:::info
Only available for core developers that publish releases.
:::

1. Add repository secrets:
   - **KEYSTORE_FILENAME**
     - Name of the `.jks`
   - **KEYSTORE**
     - Convert the `.jks` to base64:
       ```shell
       openssl base64 < filename.jks | tr -d '\n' | tee filename.txt
       ```
   - **KEYSTORE_PROPERTIES**
     - `storePassword=nononononono`
     - `keyPassword=nononononono`
     - `keyAlias=upload`
     - `storeFile=nononononono.jks`
2. Update protobufs
3. Go to Actions / Make Release / Run Workflow
4. Pick the Releases branch
5. Enter the version found in `app/gradle.build`
